#include "main.h"

void main()
{
    unsigned char i=0;
    Timer0Init();
    LED_put(1,0);

    while(1)
    {
       i=key();
       if(i)
       {
            LED_put(1,i);

       }
       //Delay(1000);
    }
}



void Timer_Cut() interrupt 1
{
	static unsigned int KEY_Count=0;
    static unsigned int LED_Count=0;
	TL0 = 0x66;		//设置定时初值
	TH0 = 0xFC;		//设置定时初值

	KEY_Count++;
	if(KEY_Count==10)
	{
		KEY_Count=0;
        key_scan();
	}
        LED_Count++;
    if(LED_Count==1)
    {
        LED_Count=0;
        LED_put_Scan();
    }
	
}